/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package projecteuler;

import java.io.File;
import java.io.FileNotFoundException;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Scanner;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author mohamed.azouz
 */
public class Main {

    public static long multiple35() {
        long tot = 0;
        for (int i = 1; i < 1000; i++) {
            if (i % 5 == 0 || i % 3 == 0) {
                tot += i;
            }
        }
        return tot;
    }
    static long dp[] = new long[4000001];

    public static long find4Mfib(int n) {
        if (dp[n] == 0) {
            dp[n] = find4Mfib(n - 1) + find4Mfib(n - 2);
        }
        return dp[n];
    }

    public static void fib(int n) {
        dp[1] = 1;
        dp[2] = 2;
        //for()
        //find4Mfib(32);
        find4Mfib(n);
        long tot = 0;
        for (int i = 1; i < dp.length; i++) {
            if (dp[i] % 2 == 0 && dp[i] != 0) {
                System.out.println(dp[i]);
                tot += dp[i];
            }
        }
        System.out.println("tot= " + tot);
    }

    public static boolean isPrime(double n) {
        int sqrt = (int) Math.sqrt((double) n);
        if (n == 2 || n == 3) {
            return true;
        }
        if (n < 2) {
            return false;
        }
        if (n % 2 == 0 || n % 3 == 0) {
            return false;
        }

        for (int i = 2; i <= sqrt; i++) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }

    public static double getLargestPrime() {
        double max = 29;
        double num = 600851475143.0;
        for (double i = 30; i <= Math.sqrt(num); i++) {
            if (isPrime(i) && num % i == 0) {
                max = Math.max(max, i);
            }

        }
        return max;
    }

    public static boolean hasuUnqchar(String s) {
        int chars[] = new int[256];
        for (int i = 0; i < s.length(); i++) {
            int v = (int) s.charAt(i);
            if (chars[v] != 0) {
                return false;
            }
            chars[v] = 1;
        }
        return true;
    }

    public static char[] reverseString(char s[]) {
        int mid = s.length / 2;
        int inc = 0;
        for (int i = s.length - 1; i >= mid; i--) {
            System.out.println(s[i] + " " + s[inc]);
            char tmp = s[i];
            s[i] = s[inc];
            s[inc] = tmp;
            System.out.println(s[i] + " " + s[inc]);
            inc++;
        }
        return s;
    }

    public static boolean isAnagram(String s1, String s2) {

        return true;
    }

    public static boolean palndromNum() {
        int max = 100001;
        for (int i = 100001; i < 999999; i++) {
        }
        return true;
    }

    public static void smallestMultiple() {
        for (double i = 2520; i < 10000000000.0; i++) {
            if (from1to20(i)) {
                System.out.println(i);
                return;
            }
        }
    }

    public static boolean from1to20(double n) {
        for (double i = 2; i <= 20; i++) {
            if (n % i != 0) {
                return false;
            }
        }
        return true;
    }

    public static int sumSquareDifference(int n) {
        //find sum of squars
        int sumofSquares = (n * (n + 1) * (2 * n + 1)) / 6;
        int squareOfSum = (int) Math.pow((int) (n * (n + 1)) / 2, 2.0);
        return Math.abs(sumofSquares - squareOfSum);
    }

    public static void prime10001st() {
        double num = 0;
        double i = 2;
        while (true) {
            if (isPrime(i)) {
                num++;
                if (num == 10001) {
                    System.out.println(i);
                    return;
                }
            }
            i++;
        }
    }

    public static void largestProduct(String s) {
        int max = 0;
        String maxS = "";
        for (int i = 0; i < s.length(); i++) {
            if (i + 4 > s.length() - 1) {
                System.out.println(maxS);
                return;
            }
            String temp = s.substring(i, i + 5);
            int tempV = sumStrig(temp);
            System.out.println(tempV + "  " + temp);
            if (max < tempV) {
                max = tempV;
                maxS = temp;
            }

        }

    }

    public static int sumStrig(String s) {
        int tot = 1;
        for (int i = 0; i < s.length(); i++) {
            tot *= Integer.valueOf(String.valueOf(s.charAt(i)));
        }
        return tot;
    }

    public static void specialPythagoreanTriplet() {
        for (int i = 2; i < 1000; i++) {
            for (int j = 2; j < 1000; j++) {
                for (int w = 2; w < 1000; w++) {
                    if (i + j + w == 1000 && (Math.pow(i, 2) + Math.pow(j, 2)) == Math.pow(w, 2)) {
                        System.out.println(i * j * w + "  " + i + " " + j + " " + w);
                        return;
                    }
                }
            }

        }
    }

    public static void summationofPrimes() {
        double tot = 0.0;
        for (int i = 2; i < 2000000; i++) {
            if (isPrime(i)) {
                tot += i;
            }
        }
        System.out.println(tot);
    }

    public static int largestProductInAGrid(int x[][]) {
        int xs[][] = {{8, 02, 22, 97, 38, 15, 00, 40, 00, 75, 04, 05, 07, 78, 52, 12, 50, 77, 91, 8},
            {49, 49, 99, 40, 17, 81, 18, 57, 60, 87, 17, 40, 98, 43, 69, 48, 04, 56, 62, 00},
            {81, 49, 31, 73, 55, 79, 14, 29, 93, 71, 40, 67, 53, 88, 30, 03, 49, 13, 36, 65},
            {52, 70, 95, 23, 04, 60, 11, 42, 69, 24, 68, 56, 01, 32, 56, 71, 37, 02, 36, 91},
            {22, 31, 16, 71, 51, 67, 63, 89, 41, 92, 36, 54, 22, 40, 40, 28, 66, 33, 13, 80},
            {24, 47, 32, 60, 99, 03, 45, 02, 44, 75, 33, 53, 78, 36, 84, 20, 35, 17, 12, 50},
            {32, 98, 81, 28, 64, 23, 67, 10, 26, 38, 40, 67, 59, 54, 70, 66, 18, 38, 64, 70},
            {67, 26, 20, 68, 02, 62, 12, 20, 95, 63, 94, 39, 63, 8, 40, 91, 66, 49, 94, 21},
            {24, 55, 58, 05, 66, 73, 99, 26, 97, 17, 78, 78, 96, 83, 14, 88, 34, 89, 63, 72},
            {21, 36, 23, 9, 75, 00, 76, 44, 20, 45, 35, 14, 00, 61, 33, 97, 34, 31, 33, 95},
            {78, 17, 53, 28, 22, 75, 31, 67, 15, 94, 03, 80, 04, 62, 16, 14, 9, 53, 56, 92},
            {16, 39, 05, 42, 96, 35, 31, 47, 55, 58, 88, 24, 00, 17, 54, 24, 36, 29, 85, 57},
            {86, 56, 00, 48, 35, 71, 89, 07, 05, 44, 44, 37, 44, 60, 21, 58, 51, 54, 17, 58},
            {19, 80, 81, 68, 05, 94, 47, 69, 28, 73, 92, 13, 86, 52, 17, 77, 04, 89, 55, 40},
            {04, 52, 8, 83, 97, 35, 99, 16, 07, 97, 57, 32, 16, 26, 26, 79, 33, 27, 98, 66},
            {88, 36, 68, 87, 57, 62, 20, 72, 03, 46, 33, 67, 46, 55, 12, 32, 63, 93, 53, 69},
            {04, 42, 16, 73, 38, 25, 39, 11, 24, 94, 72, 18, 8, 46, 29, 32, 40, 62, 76, 36},
            {20, 69, 36, 41, 72, 30, 23, 88, 34, 62, 99, 69, 82, 67, 59, 85, 74, 04, 36, 16},
            {20, 73, 35, 29, 78, 31, 90, 01, 74, 31, 49, 71, 48, 86, 81, 16, 23, 57, 05, 54},
            {01, 70, 54, 71, 83, 51, 54, 69, 16, 92, 33, 48, 61, 43, 52, 01, 89, 19, 67, 48}};
        int max = 0;
        for (int i = 0; i < x.length; i++) {
            for (int j = 0; j < x[i].length; j++) {
            }
        }
        return max;
    }

    public static int productH(int arr[][], int x, int y) {
        int pro = 1;
        for (int i = y; i < y + 5; i++) {
            if (i + 3 > arr[x].length - 1) {
                return -1;
            }
            pro *= arr[x][i];
        }
        return pro;
    }

    public static int productV(int arr[][], int x, int y) {
        int pro = 1;
        for (int i = x; i < x + 5; i++) {
            if (i + 3 > arr[i].length - 1) {
                return -1;
            }
            pro *= arr[i][y];
        }
        return pro;
    }

    public static void highlyDivisibleTriangularNumber() {
        /* int max = -1;
         int d = 0;
         for (int i = 100; i < 10000; i++) {
         int sum = (i * (i + 1)) / 2;
         //            System.out.println("asdasd");
         d = getPrimeFactor(sum);
         System.out.println(d);
         //          System.out.println(d);
         if (d >= 500) {
         System.out.println("III " + i);
         return;
         }
         }
         System.out.println(d);*/
        int number = 0;
        int i = 1;

        while (NumberOfDivisors(number) < 500) {
            number += i;
            i++;
        }
        System.out.println(number);
    }

    static int NumberOfDivisors(int number) {
        int nod = 0;
        int sqrt = (int) Math.sqrt(number);

        for (int i = 1; i <= sqrt; i++) {
            if (number % i == 0) {
                nod += 2;
            }
        }
        //Correction if the number is a perfect square
        if (sqrt * sqrt == number) {
            nod--;
        }

        return nod;
    }

    public static int getDivisorCount(long x) {
        int tot = 0;
        long size = (long) Math.ceil(x / 2);
        for (int i = 1; i <= size; i++) {
            if (x % i == 0) {
                tot++;
            }
        }
        return tot + 1;
    }

    public static int getDivisorCount__(int x) {
        int tot = 0;
        int size = (int) Math.sqrt(x);
        System.out.println(size);
        for (int i = 2; i <= size; i++) {
            if (x % i == 0) {
                System.out.println(i);
                tot++;
            }
        }
        return tot;
    }

    public static int getPrimeFactor(int n) {
        long size = (long) Math.ceil(n / 2);
        int primes[] = new int[10000000];
        int tot = 1;
        for (int i = 2; i < size; i++) {
            if (isPrime(i) && n % i == 0) {
                primes[i]++;
                int inc = 2;
                while (n % (Math.pow(i, inc++)) == 0) {
                    primes[i]++;
                }
            }
        }
        for (int i = 0; i < primes.length; i++) {
            if (primes[i] != 0) {
                //System.out.println(i + "  " + primes[i]);
                tot *= primes[i] + 1;
            }
        }
        return tot;
    }

    public static void LargeSum() {
        try {
            Scanner sc = new Scanner(new File("in.in"));
            String s = sc.nextLine();
            BigInteger sum = new BigInteger(s);
            while (sc.hasNextLine()) {
                int i = 100;
                s = sc.nextLine();
                sum = sum.add(new BigInteger(s));
            }
            System.out.println(sum.toString().subSequence(0, 10));
            System.out.println(sum);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }

    }
    static int dpCollatzSequence[] = new int[100];

    public static long longestCollatzSequence() {
        long max = -1;
        long nm = 0;
        //dpCollatzSequence[1] = 1;
        for (long i = 2; i < 1000000; i++) {
            ///int cN = getChainLoop(i);
            int cN = getChain(i, 1);
            //String s= tmp == cN ? "true" : "false";
            //System.out.println(i + "   " + cN + "    " + tmp + " " +s);
            if (max < cN) {
                max = cN;
                nm = i;
            }
        }
        return nm;

    }

    public static int getChainDP(int n, int cN) {
        if (dpCollatzSequence[n] != 0) {
            return cN;
        }
        int nn = -1;
        if (n % 2 == 0) {
            nn = (int) (n / 2);
            if (nn == 10124998) {
                System.out.println("evN==999999  => " + n);
            }
        } else {
            nn = 3 * n + 1;
            if (nn == 10124998) {
                System.out.println("OdN==999999  => " + n);
            }
        }

        dpCollatzSequence[n] = getChain(nn, cN + 1);
        return dpCollatzSequence[n];
    }

    public static int getChain(long n, int cN) {
        if (n <= 1) {
            return cN;
        }
        long nn = -1;
        if (n % 2 == 0) {
            nn = n / 2;
        } else {
            nn = (3 * n) + 1;
        }
        return getChain(nn, cN + 1);
    }

    public static int getChainLoop(int sequence) {
        int length = 1;
        while (sequence != 1) {
            System.out.println(sequence);
            if ((sequence % 2) == 0) {
                sequence = sequence / 2;

            } else {
                sequence = sequence * 3 + 1;
            }
            length++;

        }
        return length;
    }

    public static void other() {
        int number = 1000000;
        long sequenceLength = 0;
        long startingNumber = 0;
        long sequence;
        for (int i = 2; i <= number; i++) {
            int length = 1;
            sequence = i;
            while (sequence != 1) {
                if ((sequence % 2) == 0) {
                    sequence = sequence / 2;

                } else {
                    sequence = sequence * 3 + 1;
                }
                length++;

            }
//Check if sequence is the best solution
            if (length > sequenceLength) {
                sequenceLength = length;
                startingNumber = i;

            }
        }
        System.out.println(startingNumber);
    }

    public static void latticePaths() {
        for (int i = 0; i < facDP.length; i++) {
            facDP[i] = BigInteger.valueOf(0);
        }
        facDP[1] = BigInteger.valueOf(1);

        BigInteger n20 = fac(20);
        BigInteger n40 = fac(20 + 20);
        BigInteger fo2 = n40;
        BigInteger t7t = n20.multiply(n20);
        BigInteger result = fo2.divide(t7t);

        //(x+y)!/(x!*y!).  x=20 and y=20;
        System.out.println(result);

    }
    static BigInteger facDP[] = new BigInteger[101];

    public static BigInteger fac(int n) {
        if (!facDP[n].equals(BigInteger.valueOf(0))) {
            return facDP[n];
        }
        BigInteger tmp = BigInteger.valueOf(n);
        facDP[n] = tmp.multiply(fac(n - 1));
        return facDP[n];
    }

    public static void powerDigitSum() {
        BigInteger tmp = BigInteger.valueOf(2);
        String s = tmp.pow(1000).toString();
        int tot = 0;
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) == 'E') {
                break;
            }
            if (s.charAt(i) != '.') {
                System.out.println(s.charAt(i));
                tot += Integer.valueOf(s.charAt(i) + "");
            }
        }
        System.out.println(tot);
    }

    public static void numberLetterCounts() {
        HashMap<Integer, String> maps = new HashMap<Integer, String>();
        maps.put(1, "one");
        maps.put(2, "two");
        maps.put(3, "three");
        maps.put(4, "four");
        maps.put(5, "five");
        maps.put(6, "six");
        maps.put(7, "seven");
        maps.put(8, "eight");
        maps.put(9, "nine");
        maps.put(10, "ten");
        maps.put(11, "eleven");
        maps.put(12, "twelve");
        maps.put(13, "thirteen");
        maps.put(14, "fourteen");
        maps.put(15, "fifteen");
        maps.put(16, "sixteen");
        maps.put(17, "seventeen");
        maps.put(18, "eighteen");
        maps.put(19, "nineteen");
        maps.put(20, "twenty");
        maps.put(30, "thirty");
        maps.put(40, "forty");
        maps.put(50, "fifty");
        maps.put(60, "sixty");
        maps.put(70, "seventy");
        maps.put(80, "eighty");
        maps.put(90, "ninety");
        maps.put(100, "onehundred");
        maps.put(200, "twohundred");
        maps.put(300, "threehundred");
        maps.put(400, "fourhundred");
        maps.put(500, "fivehundred");
        maps.put(600, "sixhundred");
        maps.put(700, "sevenhundred");
        maps.put(800, "eighthundred");
        maps.put(900, "ninehundred");
        maps.put(1000, "onethousand");
        long tot = 0;
        for (int i = 1; i < 1001; i++) {
            String s = "";
            if (maps.containsKey(i)) {
                s = maps.get(i);
            } else {
                int div = 0;
                if (i > 100) {
                    div = 100;
                } else if (i > 10) {
                    div = 10;
                }
                int remain = i;
                while (div >= 1) {
                    int xx = remain / div;
                    if (maps.containsKey(xx * div)) {
                        s += maps.get(xx * div);
                    }
                    if (xx * div >= 100) {
                        s += "and";
                    }
                    remain = remain - xx * div;
                    if (maps.containsKey(remain)) {
                        s += maps.get(remain);
                        break;
                    }
                    div /= 10;
                }


            }
            System.out.println(i + " " + s.length() + " " + s);
            tot += s.length();
        }
        System.out.println(tot);
    }

    public static int getNumberRange(int n, int max) {
        while (n / max <= 1) {
            max /= 10;
        }
        return max;
    }

    public static ArrayList<Integer> dividNumber(int x, int div) {
        int remain = x;
        ArrayList<Integer> nums = new ArrayList<Integer>();
        while (div >= 1) {
            int xx = remain / div;
            nums.add(xx * div);
            System.out.println(xx);
            remain = remain - xx * div;
            div /= 10;
        }
        return nums;
    }

    public static void test() {
        String ones[] = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven",
            "twelve",
            "thirteen",
            "fourteen",
            "fifteen",
            "sixteen",
            "seventeen",
            "eighteen",
            "nineteen",};
        HashMap<Integer, String> maps = new HashMap<Integer, String>();
        String tens[] = {"twenty",
            "thirty",
            "forty",
            "fifty",
            "sixty",
            "seventy",
            "eighty",
            "ninety"};
        for (int i = 0; i < tens.length; i++) {
            System.out.println("maps.put(" + (i + 2) * 10 + ", \"" + tens[i] + "\");");
        }
    }

    public static long factorialDigitSum() {
        for (int i = 0; i < facDP.length; i++) {
            facDP[i] = BigInteger.valueOf(0);
        }
        facDP[1] = BigInteger.valueOf(1);

        String s = fac(100).toString();
        long tot = 0;
        for (int i = 0; i < s.length(); i++) {
            tot += Integer.valueOf(s.charAt(i) + "");
        }
        return tot;
    }
    static long amNumArray[] = new long[10001];

    public static void amicableNumbers() {
        long tot = 0;
        for (int i = 0; i < amNumArray.length; i++) {
            long sumDiv = sumNumberDivisor(i);
            if (sumDiv < amNumArray.length) {
                long sumDiv2 = sumNumberDivisor(sumDiv);
                if (sumDiv2 == i && i != sumDiv) {
                    System.out.println(i + " " + sumDiv);
                    tot += i + sumDiv;
                }

            }
        }
        System.out.println("tot = " + tot);
    }

    public static int sumNumberDivisor(long x) {
        int tot = 0;
        long size = (long) Math.ceil(x / 2);
        for (int i = 1; i <= size; i++) {
            if (x % i == 0) {
                tot += i;
            }
        }

        return tot;
    }

    public static int sumOfFactors(int number) {
        int sqrtOfNumber = (int) Math.sqrt(number);
        int sum = 1;

        //If the number is a perfect square
        //Count the squareroot once in the sum of factors
        if (number == sqrtOfNumber * sqrtOfNumber) {
            sum += sqrtOfNumber;
            sqrtOfNumber--;
        }

        for (int i = 2; i <= sqrtOfNumber; i++) {
            if (number % i == 0) {
                sum = sum + i + (number / i);
            }
        }

        return sum;
    }

    public static void ote() {
        int sumAmicible = 0;
        int factorsi, factorsj;

        for (int i = 2; i <= 10001; i++) {
            factorsi = sumOfFactors(i);
            if (factorsi > i && factorsi <= 10001) {
                factorsj = sumOfFactors(factorsi);
                if (factorsj == i) {
                    System.out.println(i + " " + factorsi);
                    sumAmicible += i + factorsi;
                }
            }
        }
        System.out.println(sumAmicible);
    }

    public static void namesScores() {
        try {
            String fileName = "sample.txt";//testing;
            fileName = "names.txt";
            Scanner sc = new Scanner(new File(fileName)).useDelimiter(",");
            ArrayList<String> names = new ArrayList<String>();
            String name = "";
            while (sc.hasNext()) {
                name = sc.next();
                names.add(name.replace("\"", ""));
            }
            BigInteger total = new BigInteger("0");
            Collections.sort(names);
            for (int i = 0; i < names.size(); i++) {
                int nameScore = singleNameScore(names.get(i));
                //System.out.println(names.get(i) + "   "  + nameScore  );
                total = total.add(BigInteger.valueOf(nameScore * (i + 1)));
            }
            System.out.println(total);
        } catch (FileNotFoundException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public static int singleNameScore(String name) {
        final int A = 64;
        int tot = 0;
        for (int i = 0; i < name.length(); i++) {
            tot += ((int) name.charAt(i)) - A;
        }
        return tot;
    }
    public static int abundantNumsp[] = new int[28124];

    public static void nonAbundantSums() {//Non-abundant sums
        int tot = 0;
        for (int i = 1; i < abundantNumsp.length; i++) {
            int tmp = numberDivisor(i);
            switch (tmp) {
                case -1:
                    break;
                default:
                    if (tmp > i) {
                        abundantNumsp[i] = 1;
                    }
                    tot += i;

            }
        }
        System.out.println(tot);
    }

    public static int numberDivisor(long x) {
        int tot = 0;
        long size = (long) Math.ceil(x / 2);
        for (int i = 1; i <= size; i++) {
            if (x % i == 0) {
                if (abundantNumsp[i] == 1) {
                    return -1;
                }
                tot += i;
            }
        }
        return tot;
    }

    public static int DistinctPowers() {
        HashSet<BigInteger> numbers = new HashSet<BigInteger>();
        for (int i = 2; i <= 100; i++) {
            for (int j = 2; j <= 100; j++) {
                BigInteger a = new BigInteger(String.valueOf(i));
                System.out.println(i + "^" + j + "  = " + a.pow(j));
                numbers.add(a.pow(j));
            }
        }
        return numbers.size();
    }
    static BigInteger[] fibSeries = new BigInteger[1000001];

    public static void findFib100() {
        fibSeries[0] = new BigInteger("1");
        fibSeries[1] = new BigInteger("1");
        System.out.println(fib2(4781).toString().length());
    }

    public static BigInteger fib2(int n) {
        if (fibSeries[n] != null) {
            return fibSeries[n];
        }
        fibSeries[n] = fib2(n - 1).add(fib2(n - 2));
        return fibSeries[n];
    }
    static BigInteger[] fac = new BigInteger[10];

    public static void Digitfactorials() {
        fac[0] = new BigInteger("1");
        BigInteger facNine = getFactorial(9);
        System.out.println(facNine);
    }

    public static BigInteger getFactorial(int n) {
        if (fac[n] != null) {
            return fac[n];
        }
        fac[n] = getFactorial(n - 1).multiply(new BigInteger(String.valueOf(n)));
        return fac[n];
    }

    public static void consecutivePrimeSum() {
        int n = 1000000;
        Boolean prime[] = new Boolean[n + 1];
        Arrays.fill(prime, true);
        prime[0] = false;
        prime[1] = false;
        int m = (int) Math.sqrt(n + 1);
        for (int i = 2; i < m; i++) {
            if (prime[i]) {
                for (int j = i * i; j <= n; j += i) {
                    prime[j] = false;
                }
            }
        }
        BigInteger in = new BigInteger("0");
        //System.out.println(prime[953]);
        int i = 2;
        while (i <= 1000000) {
            if (prime[i]) {
                in = in.add(new BigInteger(String.valueOf(i)));

                //System.out.println("THERE " + in + " ->" + i);
                // System.out.println(in + "   ---  " + n + " = " + in.compareTo(new BigInteger(String.valueOf(n))));
                if (in.compareTo(new BigInteger(String.valueOf(n))) <= 0) {
                    String s = in.toString();
                    int num = Integer.valueOf(s);
                    if (prime[(int) num]) {
                        System.out.println("HERE => " + in + " = " + i);
                    }
                } else {
                    
                    if (isPrime(in.doubleValue())) {
                        System.out.println("HERE => " + in + " = " + i);
                    }

                }
            }
            i++;
        }
        //System.out.println(in);
        //System.out.println(Arrays.toString(prime));
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        try {
            consecutivePrimeSum();
        } catch (Exception ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
